<%@ page language="java"  pageEncoding="utf-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<base target="_self" />
		<!--确认数据传递方向-->
		<title>显示Systemtree的数据</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="CSS/css_style.css">
	</head>
	<script language="javascript">
function edit_systemtree(url,fjd)
{
		showwindows(url,fjd);
		this.location.reload();	
}
function delsystemtree(fjd)
{
		var string="确认要删除本条记录吗";
		var obj=confirm(string);
		if (obj==true)
		{
			document.getElementById("fjd").value=fjd;
			document.getElementById("editsystemtree").submit();
		}	
	
}
function showwindows(url,fjd)//在这里传递数据并打开一个网页
{
	
		var obj = new Object();
     	obj.name="koadhqoh";
		//window.showModelessDialog("right_showpage",obj,"dialogWidth=400px;dialogHeight=500px");
     	window.showModalDialog("Admin/editsystemtree?url="+url+"&fjd="+fjd,obj,"dialogWidth=400px;dialogHeight=500px");
}
</script>

<s:set name="form_editinvoice" value="%{#request.form_editSystemtree}"></s:set>
	<body>
		<s:form action="editsystemtree" namespace="/Admin" theme="simple">
			<table width="600" border="0" cellspacing="1" cellpadding="1"
				class="table">
				<tr>
					<td>
						<table width="600">
							<tr class="table_title">
								<td align="center">
									父节点
								</td>
								<td align="center">
									子节点
								</td>
								<td align="center">
									超链接地址
								</td>
								<td align="center">
									功能名称
								</td>
								<td align="center">
									级别
								</td>
								<td align="center">
									操作方法
								</td>
							</tr>
							<s:iterator value="%{#request.form_editinvoice.listsystemtree}"
						status="list">
							<tr class="table_detail">
								<td align="center">
									<s:property value="f_jd" />
								</td>
								<td align="center">
									<s:property value="c_jd" />
								</td>
								<td align="center">
									<s:property value="url" />
								</td>
								<td align="center">
									<s:property value="jd_name" />
								</td>
								<td align="center">
									<s:property value="lv" />
								</td>
								<td align="center">
									<input type="button" class="btn_2k3" value="编辑" onClick="edit_systemtree('Admin/page/updateSystemtree.jsp',<s:property value="f_jd"/>)"/>
									<input type="button" class="btn_2k3" value="删除" onClick="delsystemtree(<s:property value="f_jd"/>)"/>									
								</td>
							</tr>
							</s:iterator>
						</table>
						<s:hidden name="fjd"></s:hidden>

					</td>
				</tr>
				<tr>
				  <td>

						<s:hidden name="url" value="Admin/page/editSystemtree.jsp"></s:hidden>
						<table width="100%">
					<tr>
						<td align="center" valign="bottom">
							<span id="firstpage" class="system_child"><a href="administration/Page_EditSystemtree?
url=administration/page/EditSystemtree.jsp&currentpage=<s:property value="1"/>"
								target="_self"> 第一页</a> </span>
						</td>
						<td align="center" valign="bottom">
							<span id="previouspag" class="system_child"> <a
								href="administration/Page_EditSystemtree?
url=administration/page/EditSystemtree.jsp&currentpage=<s:property value="%{#request.form_editSystemtree.pagenumber.previouspage}"/>"
								target="_self">上一页</a> </span>
						</td>
						<td align="center" valign="bottom">
							<span id="jumppage" class="system_child"> 共 <s:property
									value="%{#request.form_editSystemtree.pagenumber.maxpage}" />
								页/跳转至 <s:select
									list="%{#request.form_editSystemtree.pagenumber.pagelist}"
									listKey="selectvalue" listValue="selectview"
									emptyOption="false"
									value="%{#request.form_editSystemtree.pagenumber.currentpage}"
									name="currentpage"></s:select> <s:submit value="跳转"
									cssClass="btn_2k3"></s:submit> </span>
						</td>
						<td align="center" valign="bottom">
							<span id="nextpage" class="system_child">
							<a
								href="administration/Page_EditSystemtree?
url=../administration/page/EditSystemtree.jsp&currentpage=<s:property value="%{#request.form_editSystemtree.pagenumber.nextpage}"/>"
								target="_self">下一页</a></span>		
						</td>
						<td align="center" valign="bottom">
							<span id="lastpage" class="system_child"> <a
								href="administration/Page_EditSystemtree?
url=../administration/page/EditSystemtree.jsp&currentpage=<s:property value="%{#request.form_editSystemtree.pagenumber.maxpage}"/>"
								target="_self">最末页</a> </span>
						</td>
					</tr>
				</table>
						<input type="button" class="btn_2k3_100" value="添加新的节点" onClick="edit_systemtree('Admin/page/updateSystemtree.jsp',-1)">
						
			</table>
		</s:form>
	</body>
</html>
